package com.mochat.user.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mochat.api.user.UserRemoteServiceI;
import com.mochat.mapper.UserMapper;
import com.mochat.model.UserInfo;
import com.mochat.redis.CustomRedisClusters;

@Service("userRemoteService")
public class UserRemoteService implements UserRemoteServiceI{

	@Autowired
	private CustomRedisClusters customRedisClusters;
	
	@Autowired
	private UserMapper userMapper;
	/**
	 * 获取用户信息
	 */
	@Override
	public UserInfo getUserInfo(UserInfo userInfo) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * 获取用户币值的个数
	 */
	@Override
	public Double getUserCoin(UserInfo userInfo) {
		// TODO Auto-generated method stub
		
		String userId = userInfo.getUserId();
		
		return null;
	}

	/**
	 * 获取登陆用户
	 */
	@Override
	public List<UserInfo> getLoginUserInfo(UserInfo userInfo) {
		// TODO Auto-generated method stub
		return userMapper.getUserInfo(userInfo);
	}

	@Override
	public void update(UserInfo userInfo) {
		// TODO Auto-generated method stub
		
	}

	/**
	 * 用户注册
	 */
	@Override
	@Transactional
	public void userRegister(UserInfo userInfo) {
		// TODO Auto-generated method stub
		
		userMapper.userRegister(userInfo);
	}

	
	
}
